<template>
  <div class="error-page">
    <div class="content-con">
      <img :src="src" :alt="code" />
      <div class="text-con">
        <h4>{{ code }}</h4>
        <h5>{{ desc }}</h5>
      </div>
      <div class="mt-10">
        <Button type="primary" class="mr-10" @click="backHome">返回首页</Button>
        <Button type="primary" @click="backPrev">返回上一页</Button>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator";
import { Tools } from "@/model/tools.ts";
@Component
export default class ErrorContent extends Tools {
  @Prop()
  code!: string;
  @Prop()
  desc!: string;
  @Prop()
  src!: string;
  // private code: string = "321321321";
  private backHome() {
    this.$router.replace("/index");
  }

  private backPrev() {
    this.$router.go(-1);
  }
}
</script>
<style lang="stylus" scoped>
@import '~stylus/error.styl'
</style>

